package com.day12.study.condtion_demo;

public class Producter implements Runnable {
    private ProductBase pb;

    public Producter(ProductBase pb) {
        super();
        this.pb = pb;
    }

    @Override
    public void run() {
        int i = 0;
        while (true) {
            if (i % 2 == 0) {
                pb.put("馒头", 5);
            } else {
                pb.put("包子", 1);
            }
            i++;
        }
    }
}
